const url_params = new URLSearchParams(windows.location.search)

if(!url_params.has('id')){
    windows.location.href - 'error.html'
}

$.getJSON(`${base_url}/intro?id=${url_params.get('id')}`, function (json) {

    handle_code(json)
    json = json.data

    $('#name').text(json.name)
    $("#intro").text(json.intro)
    $("#about").text(json.about)
  
    // 0为男生，1为女生
    if (json.sex) {
      $("#sex").text('👦')
    } else {
      $("#sex").text('👧')
    }
  
  });

